Background

Background

Motivated by ecological communities to develop tools for multi-dimensional time series

Time series of rodent populations

Time series of rodent populations

Background

Motivated by ecological communities to develop tools for multi-dimensional time series

Time series of rodent populations with putative qualitative changes noted

Time series of rodent populations with putative qualitative changes noted

Background

Quantify how ecosystems are responding to stressors

  • Climate change
  • Invasive species
  • Landscape alteration

Phase plane of precipitation and temperature at Portal over time

Phase plane of precipitation and temperature at Portal over time

Background

Need to distinguish among dynamics

  • Stochasticity
  • Autocorrelation
  • Cyclical dynamics
  • Gradual change
  • Abrupt shifts

Time series of rodent populations zoomed in to moons 200 to 400

Time series of rodent populations zoomed in to moons 200 to 400

Background

Background

Background (coming soon!)

LDATS: Linguistic Decomposition Algorithms coupled with Time Series analyses


Christensen et al. 2018 established methods

Goals for LDATS Package

Goals for LDATS Package

Statistical Approach

Two-stage analyses:

  1. Reduce dimensions
  2. Analyze time series from [1]

Dimension Reduction

Latent Dirichlet Allocation

\(M\) total documents
\(N\) total words
\(w\) word identity
\(z\) topic identity
\(\theta\) topics-in-documents
\(\alpha\) Dirichlet parameter for \(\theta\)
\(\beta\) terms-in-topics

Plate notation for Latent Dirichlet Allocation

Plate notation for Latent Dirichlet Allocation

   
Bookshelf

Bookshelf

Dimension Reduction

Latent Dirichlet Allocation

Matrix decomposition representation of LDA

Matrix decomposition representation of LDA

 
Bookshelf

Bookshelf

Dimension Reduction

Dimension Reduction

Time Series

Multivariate response with a suite of possible dynamics

Time series of LDA decomposed rodent data

Time series of LDA decomposed rodent data

Time Series

Multivariate response

Softmax-based regression via nnet

  \[S(y_i) = \frac{e^y_i}{\sum_je^y_j}\]

Time Series (coming soon!)

Multivariate response

Simplex-based regression via compositions

  \[\mathrm{ILR}(y_i) = \sqrt{\frac{i}{i+1}}\mathrm{ln}(\frac{\overline{\mathbf{x}}}{x_{i+1}}) \]

Time Series

Bayesian Change Point Indicator Regression

Change Point time series from Ruggieri paper showing application of multi-change point model to NOAA temperature anomaly data

Change Point time series from Ruggieri paper showing application of multi-change point model to NOAA temperature anomaly data

Time Series

Bayesian Change Point Indicator Regression

  • 0, 1, … change points
  • varying dynamics between change points
Time series of LDA decomposed rodent data

Time series of LDA decomposed rodent data

Time Series

Sequential fitting:

  1. Posterior probability of change points, unconditional on regressors
    • produces estimates of regressors conditional on change points
  2. De-condition posterior probabilities of regressors given uncertain change points

Time Series

Time series of LDA decomposed rodent data analyzed using the time series model, with change points and fitted dynamics shown

Time series of LDA decomposed rodent data analyzed using the time series model, with change points and fitted dynamics shown

Time Series

Estimation via parallel tempering Markov Chain Monte Carlo (ptMCMC) over the top of multinomial regression

Coded internally in LDATS functions

ptMCMC

Figure 1 from Earl and Deem 2005 showing a 2-D representation of a phase space for which ptMCMC is useful

Figure 1 from Earl and Deem 2005 showing a 2-D representation of a phase space for which ptMCMC is useful

Figure 2 from Earl and Deem 2005, a schematic of parallel tempering chains with swapping

Figure 2 from Earl and Deem 2005, a schematic of parallel tempering chains with swapping

LDATS Package

LDATS Package

Top-level API:

LDA_TS(data, topics = 2, nseeds = 1, formulas = ~1, nchangepoints = 0, timename = "time", weights = TRUE, control = list())

Multi-model friendly

Down-and-dirty details in control lists

LDATS Package (coming soon!)

Top-level API v0.3.0:

LDA_TS(data, topics = 2, replicates = 1, formulas = ~1, nchangepoints = 0, timename = "time", weights = TRUE, control = list())

Multi-model friendly

Down-and-dirty details in control lists

LDATS Package

LDATS Package

Internally-conducted summaries

ldats <- LDA_TS(data)

lda[["Selected TS model"]][["rho_summary"]]

Changepoint ptMCMC summary table
Mean Median Mode Lower95 Upper95 SD MCMCerr AC10 ESS
209.3 211 215 190 225 9.7 0.307 0.01 380.35

LDATS Package

Internally-conducted summaries

ldats <- LDA_TS(data)

lda[["Selected TS model"]][["eta_summary"]]

LDATS Package

Regressor ptMCMC summary table
Mean Median Lower_95. Upper_95. SD MCMCerr AC10 ESS
1_2:(Intercept) 4.0036 4.0243 1.6620 6.8060 1.3454 0.0425 0.0094 1000.0000
1_2:sin_year -0.3418 -0.4003 -3.6011 3.0493 1.7426 0.0551 0.0262 1000.0000
1_2:cos_year -0.0026 -0.0498 -3.7253 3.2932 1.8382 0.0581 0.0163 1000.0000
1_3:(Intercept) 4.6038 4.5977 1.9996 7.2317 1.3397 0.0424 0.0038 1000.0000
1_3:sin_year -0.0342 -0.1448 -3.2549 3.3501 1.7418 0.0551 0.0349 1000.0000
1_3:cos_year 0.0358 -0.0341 -3.5637 3.4618 1.8196 0.0575 0.0276 1000.0000
1_4:(Intercept) 4.1062 4.1398 1.6778 6.8296 1.3486 0.0426 0.0040 1000.0000
1_4:sin_year 0.3525 0.2968 -3.2788 3.3958 1.7471 0.0552 0.0432 1000.0000
1_4:cos_year 0.8800 0.8270 -2.4651 4.4997 1.8530 0.0586 0.0208 1000.0000
1_5:(Intercept) 1.6518 1.7057 -1.5298 4.3376 1.5107 0.0478 0.0073 1000.0000
1_5:sin_year -0.5321 -0.5591 -3.9735 3.2118 1.8668 0.0590 0.0224 1000.0000
1_5:cos_year -0.8481 -0.8340 -4.5197 2.9822 1.9928 0.0630 0.0329 1000.0000
2_2:(Intercept) -0.0674 -0.0660 -0.3786 0.2384 0.1585 0.0050 0.0253 1000.0000
2_2:sin_year 0.2567 0.2568 -0.1634 0.6372 0.2051 0.0065 -0.0278 1000.0000
2_2:cos_year 0.2549 0.2577 -0.1682 0.6894 0.2195 0.0069 -0.0247 1000.0000
2_3:(Intercept) -3.1093 -3.0894 -4.1536 -2.1059 0.5211 0.0165 -0.0045 1000.0000
2_3:sin_year -0.2543 -0.2546 -1.4403 1.0769 0.6797 0.0215 -0.0112 1000.0000
2_3:cos_year 0.0130 -0.0209 -1.4893 1.4148 0.7356 0.0233 0.0099 1000.0000
2_4:(Intercept) -1.5830 -1.5814 -2.1843 -1.0077 0.2980 0.0094 0.0283 1000.0000
2_4:sin_year 0.8906 0.8970 0.1771 1.5999 0.3670 0.0116 0.0108 661.4502
2_4:cos_year 1.0036 0.9791 0.2897 1.7794 0.3838 0.0121 -0.0294 1000.0000
2_5:(Intercept) -0.0806 -0.0848 -0.3907 0.2675 0.1702 0.0054 0.0110 1000.0000
2_5:sin_year -0.2238 -0.2135 -0.6292 0.1596 0.2078 0.0066 0.0292 1000.0000
2_5:cos_year -0.8205 -0.8260 -1.2504 -0.3399 0.2363 0.0075 0.0011 1000.0000

LDATS Package

Plotting functionality

ldats <- LDA_TS(data)

plot(ldats)

LDATS Package

Time series of LDA decomposed rodent data

Time series of LDA decomposed rodent data

Time series of LDA decomposed rodent data analyzed using the time series model, with change points and fitted dynamics shown

Time series of LDA decomposed rodent data analyzed using the time series model, with change points and fitted dynamics shown

LDATS Package

LDATS Package

Application

Application

Results of LDATS analyses for many ecological communities

Results of LDATS analyses for many ecological communities

Interested?

Acknowledgements

Funding

National Science Foundation: DEB-1622425, DGE-1315138, DGE-1842473

Gordon and Betty Moore Foundation: Data-Driven Discovery Initiative Grant GBMF4563

Weecology, DAPPER Stats, and UF logos

Weecology, DAPPER Stats, and UF logos